0 POKE808,239:REM DISABLE STOP KEY 10 REM ****************************** 11 REM * MAELZEL'S MODERN METRONOME * 12 REM * BY ROBERT S. OWEN * 13 REM * DEDICATED TO * 14 REM * JIMMY THOMPSON * 15 REM ****************************** 100 GOSUB5000 300 PRINTCHR$(150) 310 POKES,0:POKEVIC+2,136:POKE198,0 311 PRINTCHR$(19)TAB(38)SP$" " 312 PRINTCHR$(19)TAB(38)TP$"_" 320 GOSUB7300:GETA$:IFA$=""THEN320 321 IFA$="3"THEN320 322 IFA$<>CHR$(13)THEN325 324 GOTO380 325 IFA$<>CHR$(141)THEN330 327 PRINTCHR$(19)TAB(38)TP$" " 328 GOTO7000 330 IFA$<"1"ORA$>"9"THEN320 331 T$=A$:PRINTCHR$(19)TAB(28)TP$CHR$(18)T$" " 340 GOSUB7300:GETA$:IFA$=""THEN340 345 IFA$<"0"ORA$>"9"THEN340 346 IFT$="2"THENIFA$>"0"THEN340 350 T$=T$+A$:PRINTCHR$(19)TAB(28)TP$CHR$(18)T$" " 351 IFVAL(T$)>39THEN380 360 GOSUB7300:GETA$:IFA$=""THEN360 365 IFA$<"0"ORA$>"9"THEN360 370 T$=T$+A$ 380 PRINTCHR$(19)TAB(28)TP$CHR$(146)T$" " 390 TS=.935*VAL(T$)+35.6:POKEVIC+1,TS 395 PRINTCHR$(19)TAB(38)TP$" " 396 PRINTCHR$(19)TAB(38)BT$"_" 520 GOSUB7300:GETA$:IFA$=""THEN520 521 IFA$=CHR$(13)THEN580 525 IFA$<"1"ORA$>"8"THEN520 530 B$=A$:PRINTCHR$(19)TAB(28)BT$CHR$(18)B$"/ " 540 GOSUB7300:GETA$:IFA$=""THEN540 541 IFA$=CHR$(13)THEN540 545 IFA$<>"1"ANDA$<>"2"ANDA$<>"4"ANDA$<>"8"THEN540 550 BB$=A$:PRINTCHR$(19)TAB(28)BT$CHR$(146)B$"/"BB$ 580 PRINTCHR$(19)TAB(38)BT$" " 581 PRINTCHR$(19)TAB(38)GG$"_" 610 GOSUB7300:GETA$:IFA$<>CHR$(13)THEN610 680 PRINTCHR$(19)TAB(38)GG$" " 681 PRINTCHR$(19)TAB(38)SP$"_" 1010 TT=(1/VAL(T$))*(3600-((VAL(T$)/70)*175)):REM CONTAINS A FUDGE FACTOR 1015 L=136-((1/VAL(T$))*4760):IFL<17THENL=17 1016 H=136+((1/VAL(T$))*4760):IFH>255THENH=255 1020 B=VAL(B$) 1030 IFB=6ANDBB$="8"THENB=2 1040 IFB=1THEN2010 1050 IFB=5ORB=7THENIFBB$>"1"THEN2050 1060 GOTO2020 2010 GOSUB2060:IFPEEK(K)=0THEN2010 2011 GOTO310 2020 GOSUB2060:FORI=1TO(B-1):GOSUB2080:NEXTI:IFPEEK(K)=0THEN2020 2021 GOTO310 2050 IFB=7THENGOSUB2060:GOSUB2080:IFPEEK(K)>0THEN310 2055 GOSUB2060:GOSUB2080:IFPEEK(K)>0THEN310 2057 GOSUB2060:GOSUB2080:GOSUB2080:IFPEEK(K)=0THEN2050 2058 GOTO310 2060 TI$="000000":GOSUB7310 2062 IFTI<3THEN2062 2063 POKES,0 2065 IFPEEK(K)>0THENRETURN 2066 P=PEEK(SPR)+5*D:IFPHTHENP=PEEK(SPR) 2067 POKESPR,P:IFTI0THENRETURN 2086 P=PEEK(SPR)+5*D:IFPHTHENP=PEEK(SPR) 2087 POKESPR,P:IFTI"9"THEN7120 7126 IFA$>"1"THENIFA$<":"THENHH=0:TH$="0":GOTO7146 7130 TH$=A$:PRINTCHR$(19)TAB(34)TH$" : " 7131 HH=VAL(A$)*16 7140 GETA$:IFA$=<"/"ORA$>"9"THEN7140 7145 IFVAL(TH$+A$)>12THEN7140 7146 TH$=TH$+A$:PRINTCHR$(19)TAB(34)TH$": " 7147 HL=VAL(A$) 7148 POKEHR,HH+HL 7150 GETA$:IFA$=<"/"ORA$>"5"THEN7150 7155 TM$=A$:PRINTCHR$(19)TAB(34)TH$":"TM$ 7156 MH=VAL(A$)*16 7160 GETA$:IFA$=<"/"ORA$>"9"THEN7160 7164 TM$=TM$+A$ 7165 PRINTCHR$(19)TAB(34)CHR$(18)CHR$(144)TH$":"TM$CHR$(146)CHR$(150) 7166 ML=VAL(A$) 7167 POKEMN,MH+ML 7168 POKESC,0:POKETN,0 7180 PRINTCHR$(19)TAB(38)DN$" " 7181 PRINTCHR$(19)TAB(38)AL$"_" 7200 REM **CHECK QUIT ROUTINE** 7220 GOSUB7300:GETA$:IFA$=""THEN7220 7230 IFA$=CHR$(141)THEN7500 7240 IFA$=CHR$(13)THEN7260 7250 GOTO7220 7260 PRINTCHR$(19)TAB(38)AL$" " 7270 GOTO310 7300 REM **UPDATE CLOCK ROUTINE** 7310 IFPEEK(MN)=(MH*16)+MLTHENRETURN 7320 HH=(PEEK(HR)AND112)/16:HL=(PEEK(HR)AND15) 7330 MH=(PEEK(MN)AND240)/16:ML=(PEEK(MN)AND15) 7335 DU=PEEK(TN) 7340 PRINTCHR$(19)CHR$(18)CHR$(144)TAB(34)CHR$(HH+48)CHR$(HL+48); 7341 PRINT":"CHR$(MH+48)+CHR$(ML+48)CHR$(146)CHR$(150) 7350 RETURN 7500 REM **QUIT ROUTINE** 7510 POKE53269,0 7520 PRINTCHR$(147)CHR$(154):POKE53280,14:POKE53281,6 7530 PRINTCHR$(9):POKE808,237 7540 END